package IC.AST;
import java.util.*;


/* A class that represents two lists, one for method and one for field */

public class FieldsAndMethod {
	List<Method> method_list;
	List<Field> field_list;
	
	/*constructors */
	
	public FieldsAndMethod(){
		method_list = new LinkedList<Method>();
		field_list =new LinkedList<Field>();
			
	}

	public FieldsAndMethod(int line){
		this();
			
	}
	
	public FieldsAndMethod(Method m){
		this();
		method_list.add(m);
			
	}
	
	public FieldsAndMethod(Field f){
		this();
		field_list.add(f);
			
	}
	
	/*getters */
	
	public List<Method> get_method_list(){
		return method_list;
	}
	
	public List<Field> get_field_list(){
		return 	field_list;
	}
	
	/*adders*/
	
	public void add_field(Field f){
		field_list.add(f);	
		
	}
	
	public void add_method(Method m){
		method_list.add(m);	
		
	}
	
	public void add_list_fields (List<Field> f){
		field_list.addAll(f);
	}
		
}